//引入字体图标样式
require("../../assets/fonts/iconfont.css");
//引入axios
const axios = require("../../assets/js/axios.js");
//引入自己的样式
let obj = require("../../assets/js/my.js");
let $ = obj.$;
let local = obj.local;

//引入自己的样式
require("./add_dynamics.less");
document.addEventListener("DOMContentLoaded", function () {
	//点击跳转
	$(".icon-cuowuguanbiquxiao").addEventListener("click", function () {
		history.back();
	});
	let Ivalue = "";
	$("#idea").addEventListener("change", function () {
		Ivalue = this.value;
	});
	$("#titleBtn").addEventListener("click", function () {
		axios
			.post("/api/circles/opinion", {
				content: Ivalue,
				releaseProvinceId: 120000,
				releaseCityId: 121000,
				imgUrls: [
					"/uploadFiles/portrait/1665844075253.def.jpg",
					"/uploadFiles/portrait/1665844075253.def.jpg",
				],
			})
			.then((res) => {
				$("#idea").value = "";
				console.log(res);
			});
	});
});
